<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html{
            /* 设置当前网页的视距为800px，人眼距离网页的距离 */
            perspective: 800px;
        }
        body{
            border: 1px red solid;
            background-color: silver;
        }
        .box1{
            width: 200px;
            height: 200px;
            background-color:#bfa ;
            margin: 200px auto;
            transition:  1s;
        }
     img{
           height: 200px;

        }
        body:hover .box1{
            /* 通过旋转可以使元素沿着想x,y，z轴旋转指定的角度 */
            /* transform: rotateZ(0.5turn); */
            /* transform: rotateZ(45deg);
            transform: rotateX(45deg);
            transform: rotateY(-45deg); */
            /* transform: rotateY(180deg) translateZ(200px); */
            /* transform: translateZ(200px)  rotateY(180px); */
transform: rotateY(180deg);
/* 旋转完了是否显示背面 */
backface-visibility: hidden;
        }
    </style>
</head>
<body>
    <div class="box1">
        <img src="./img/02.jpg" alt="">
    </div>
</body>
</html>